/**
 * 
 */
package at.ac.tuwien.swa075.telco.auc.service;

import at.ac.tuwien.swa075.telco.auc.AucException;

/**
 * A service interface that provides operations for profile administration.
 * 
 * @author Johannes Mayr <johannes.mayr@chello.at>
 */
public interface IProfile {

	/**
	 * Adds a subscriber authentication to the AUC.
	 * 
	 * @param imsi
	 *            The subscriber identity.
	 * @param pin
	 *            The pin code.
	 * @throws AucException
	 *             An error occured while creating the subscriber
	 *             authentication.
	 */
	public void addProfile(String imsi, String pin) throws AucException;

	/**
	 * Deletes an authentication profile by marking it as deleted.
	 * 
	 * @param imsi
	 *            The subscriber identity .
	 * @return True if the profile has been deleted.
	 * @throws AucException
	 *             An error occured during the delete operation.
	 */
	public boolean deleteProfile(String imsi) throws AucException;
	
	/**
	 * Deletes a previously deleted authentication profile physically in the database. This service is only provided for cleanup tasks.
	 * @param imsi The subscriber number to delete.
	 * @return True if the profile has been erased.
	 * @throws AucException An error occured during delete.
	 */
	public boolean eraseProfile(String imsi) throws AucException; 

	/**
	 * Checks if the AUC contains an authentication profile for a given
	 * subscriber identity.
	 * 
	 * @param imsi
	 *            The subscriber identity.
	 * @return True if there exists an auhtentication entry for the given
	 *         subscriber identity.
	 * @throws AucException
	 *             An error occured during the lookup.
	 */
	public boolean existsProfile(String imsi) throws AucException;

}
